#include <iostream>
#include <map>
#include <vector>
using namespace std;
class Solution
{
public:
    vector<int> twoSum(vector<int> &nums, int target)
    {
        map<int, int> m;
        for (int i = 0; i < nums.size(); i++)
        {
            m.insert(pair<int, int>(nums[i], i));
        }
        for (int i = 0; i < nums.size(); i++)
        {
            int n1 = nums[i];
            int n2 = target - nums[i];
            if (m.find(n2) != m.end() && i != m[n2])
                return {i, m[n2]};
        }
        return {};
    }
};
int main()
{
    Solution *s = new Solution();
    vector<int> v{3, 3};
    vector<int> ans = s->twoSum(v, 6);
    cout << "hello world" << endl;
    cout << ans[0] << "," << ans[1] << endl;
    return 0;
}